home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
176-200
/
disk_191
/
blk
/
pro.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
2KB
|
76 lines
#include <stdio.h>
#include <functions.h>
#include <exec/types.h>
#include <intuition/intuition.h>
#define OK_ID 0x80
#define CAN_ID 0x81
#define STR_ID 0x82
#define NUMCHR 20
struct TextAttr ta = { (UBYTE*)"topaz.font",8,0,0 };
UBYTE undo[NUMCHR];
#define REQ col_req
#include "prototype.h"
struct NewWindow nwin = {
0,0,300,150,
-1,-1,GADGETUP|GADGETDOWN|REQCLEAR|MOUSEMOVE,
WINDOWDEPTH|WINDOWDRAG|SMART_REFRESH,
NULL,NULL,(UBYTE*)"Blocks",NULL,
NULL,0,0,0,0,WBENCHSCREEN
};
struct IntuitionBase *IntuitionBase;
main(argc,argv)
int argc;
char *argv[];
{
struct Window *win;
IntuitionBase=(struct IntuitionBase *)OpenLibrary("intuition.library",0L);
if (IntuitionBase) {
nwin.Width = REQ.Width + 10;
nwin.Height = REQ.Height + 14;
win = OpenWindow (&nwin);
if (win) {
Body (win);
CloseWindow (win);
}
CloseLibrary (IntuitionBase);
}
}
Body(win)
struct Window *win;
{
struct IntuiMessage *im;
BOOL looping=TRUE;
ULONG class;
/* set up proportional gadgets
scol_pinfo[0].HorizBody = ((long)0xffff)/16;
scol_pinfo[1].HorizBody = ((long)0xffff)/16;
scol_pinfo[2].HorizBody = ((long)0xffff)/16;
*/
REQ.LeftEdge = 5;
REQ.TopEdge = 12;
Request (&REQ,win);
while (looping) {
im = (struct IntuiMessage *) GetMsg(win->UserPort);
if (!im) WaitPort (win->UserPort);
else {
printf ("Message: %lx\n", im);
class = im->Class;
ReplyMsg (im);
if (class == REQCLEAR) looping = FALSE;
}
}
}